<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="org.springside.modules.security.springsecurity.SpringSecurityUtils" %>
<%@ include file="/common/taglibs.jsp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>信息管理 - <s:text name="context.title"/></title>
	<%@ include file="/common/meta.jsp" %>
	  <script type="text/javascript" language="javascript">

          var pageTotalPages = "1";
          var pageNo = "";
        $(document).ready(function() {
        	var pageTotalPages = $("#pageTotalPages").val();
            var pageNo = $("#pageNo").val();
            $("#pager").pager({ pagenumber: pageNo, pagecount: pageTotalPages, buttonClickCallback: PageClick });
        });

        PageClick = function(pageclickednumber) {
            $("#pager").pager({ pagenumber: pageclickednumber, pagecount: pageTotalPages, buttonClickCallback: PageClick });
           // $("#result").html("Clicked Page " + pageclickednumber);
            jumpPage(pageclickednumber);
        }
       
    </script>
</head>

<body>
<h1 class="title01"><img src="${ctx}/images/02_15.gif" width="45" height="42" class="fl"/><security:authorize ifAnyGranted="ROLE_信息维护">
				<a href="info-input.action">增加新信息</a>
			</security:authorize>信息管理 </h1>
	<form id="mainForm" action="info.action" method="get">
		<input type="hidden" name="page.pageNo" id="pageNo" value="${page.pageNo}"/>
		<input type="hidden" name="page.orderBy" id="orderBy" value="${page.orderBy}"/>
		<input type="hidden" name="page.order" id="order" value="${page.order}"/>
		
		<input type="hidden" id="pageTotalPages"  value="${page.totalPages}"/>

		<div id="message"><s:actionmessage theme="custom" cssClass="success"/></div>
		
		<div id="content">
			<table id="contentTable" class="table_ys tableColor">
				<tr>
					<th><a href="javascript:sort('infoTitle','asc')">信息标题</a></th>
					<th>附件</th>
				    <th><a href="javascript:sort('infoTime','asc')">发布时间</a></th>
				    <th><a href="javascript:sort('lastUser','asc')">发布人</a></th>
					<th>操作</th>
				</tr>

				<s:iterator value="page.result" var="v" >
					<tr>
						<td>${infoTitle}&nbsp;&nbsp;</td>
						<td><s:if test=" #v.InfoAttachmentName != null"><img src="${ctx}/images/02_15.gif" width="15" height="15" class="fl"/><a href="info!download.action?id=${id}">下载</a></s:if>
						<s:else>&nbsp;无</s:else>&nbsp;</td>
						<td>&nbsp;
							<s:date name="infoTime" format="yyyy年MM月dd日"/>
						</td>
						<td><s:property value="lastUser.name"/>&nbsp;&nbsp;</td>
						
						<td>&nbsp;
								<a href="info!input.action?id=${id}">查看</a>&nbsp;
								
							<security:authorize ifAnyGranted="ROLE_公告可修改">
								<a href="info!input.action?id=${id}">修改</a>&nbsp;
								<a href="info!delete.action?id=${id}" onClick="return confirm('确定删除?')">删除</a>
							</security:authorize>
															
						&nbsp;</td>
					</tr>
				</s:iterator>
			</table>
		</div>

		<div>
			<div align="center" id="pager" ></div>

			
		</div>
	</form>
</body>
</html>
